<template>
  <BasicModal 
    v-bind="$attrs" 
    @register="registerModal" :title="params?.title"
    :defaultFullscreen="true"
    destroyOnClose
  >
    <slot v-bind:data="params || {}"></slot>

  </BasicModal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
const emit = defineEmits(['register', 'success']);
const params = ref<any>()
const [registerModal, { setModalProps }] = useModalInner(async (data) => {
  params.value = null
  setModalProps({ 
    confirmLoading: false, 
    canFullscreen: false,  
    draggable: false,
    ...(data.modalProps || {}) 
  })
  params.value = data || {}
})

</script>
